
import 'package:thinking/config/_.dart';

class UserEntity{
  int? _code;
  UserList? _data;
  String? _message;

  UserEntity({int? code,UserList? data,String? message}){
    this._code = code;
    this._data = data;
    this._message = message;
  }

  int? get code => _code;
  set setCode(int code)=>_code = code;
  String? get message => _message;
  set setMessage(String message) => _message = message;
  UserList? get data =>_data;
  set getData(UserList data) => _data = data;
  UserEntity.fromJson(Map<String,dynamic> json){

    _code = json['code'];
    _data = json['data'] != null ? new UserList.fromJson(json['data']):null;
    _message = json['message'];

  }

  Map<String,dynamic> toJson(){
    final Map<String,dynamic> data = new Map<String,dynamic>();
    data['code'] = this._code;
    data['message'] = this._message;
    data['data'] = this._data!.toJson();

    return data;
  }

}

class UserList{
  UserData? _userData;
  String? _userToken;

  UserList({UserData? userData, String? userToken}) {
    this._userData = userData;
    this._userToken = userToken;
  }

  UserData? get userData => _userData;
  set setUserData(UserData userData) => _userData = userData;
  String? get userToken => _userToken;
  set setUserToken(String userToken) => _userToken = userToken;

  UserList.fromJson(Map<String, dynamic> json) {
    _userData = json['user_Data'] != null ? new UserData.fromJson(json['user_Data']) : null;
    _userToken = json['user_Token'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this._userData != null) {
      data['user_Data'] = this._userData!.toJson();
    }
    data['user_Token'] = this._userToken;
    return data;
  }
}

class UserData{

  int? _userId;
  String? _userPassWord;
  String? _userPhone;
  String? _userHeadImg;
  String? _userNickName;
  int? _userLoginStatus;
  int? _userFans;
  int? _userFollows;
  bool?_isFollow;
  UserInfo? _userUserInfo;

  UserData({
    int? userId,
    String? userPassWord,
    String? userPhone,
    String? userHeadImg,
    String? userNickName,
    int? userLoginStatus,
    int? userFans,
    int? userFollows,
    bool? isFollow,
    UserInfo? userUserInfo
}){
    this._userId = userId;
    this._userPassWord = userPassWord;
    this._userPhone = userPhone;
    this._userHeadImg = userHeadImg;
    this._userNickName = userNickName;
    this._userLoginStatus = userLoginStatus;
    this._userFans = userFans;
    this._userFollows = userFollows;
    this._isFollow = isFollow;
    this._userUserInfo = userUserInfo;

  }

  UserInfo? get userUserInfo => _userUserInfo;
  set setUserUserInfo(UserInfo userUserInfo) => _userUserInfo = userUserInfo;
  int? get userId => _userId;
  set setUserId(int userId) => _userId = userId;
  int? get userFans => _userFans;
  set setUserFans(int userFans) => _userFans = userFans;
  int? get userFollows => _userFollows;
  set setUserFollows(int userFollows) => _userFollows = userFollows;
  String? get userPassWord => _userPassWord;
  set setUserPassWord(String userPassWord) => _userPassWord = userPassWord;
  String? get userPhone => _userPhone;
  set setUserPhone(String userPhone) => _userPhone = userPhone;
  String? get userHeadImg => _userHeadImg;
  set setUserHeadImg(String userHeadImg) => _userHeadImg = userHeadImg;
  String? get userNickName => _userNickName;
  set setUserNickname(String userNickname) => _userNickName = userNickname;
  int? get userLoginStatus => _userLoginStatus;
  set setUserLoginStatus(int userLoginStatus) => _userLoginStatus = userLoginStatus;
  bool? get isFollow => _isFollow;
  set setIsFollow(bool isFollow) => _isFollow = isFollow;

  UserData.fromJson(Map<String, dynamic> json) {
    _userUserInfo = json['user_UserInfo'] != null ? new UserInfo.fromJson(json['user_UserInfo']) : null;
    _userId = json['user_Id'];
    _userFans = json['user_Fans'];
    _userFollows = json['user_Follows'];
    _userPassWord = json['user_PassWord'];
    _userPhone = json['user_Phone'];
    _userHeadImg = Config.apiUrl['BasePhotoUrl'] +json['user_HeadImg'];
    _userNickName = json['user_NickName']!=null?json['user_NickName']:null;
    _isFollow = json['isFollow']!=null?json['isFollow']:false;
    _userLoginStatus = json['user_LoginStatus'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this._userUserInfo != null) {
      data['user_UserInfo'] = this._userUserInfo!.toJson();
    }
    data['user_Id'] = this._userId;
    data['user_PassWord'] = this._userPassWord;
    data['user_Fans'] = this._userFans;
    data['user_Follows'] = this._userFollows;
    data['user_Phone'] = this._userPhone;
    data['user_HeadImg'] = this._userHeadImg;
    data['user_NickName'] = this._userNickName;
    data['isFollow'] = this._isFollow;
    data['user_LoginStatus'] = this._userLoginStatus;
    return data;
  }

}

class UserInfo{
  String? _userAutograph;
  String? _userBankCard;
  String? _userBirthday;
  String? _userConstellation;
  String? _userEmail;
  String? _userIdCard;
  String? _userRealName;
  String? _userCreateTime;
  String? _userSex;
  String? _userWork;
  int? _userDynamicNum;

  UserInfo(
      {String? userAutograph,
        String? userBankCard,
        String? userBirthday,
        String? userConstellation,
        String? userEmail,
        int? userId,
        String? userIdCard,
        String? userPhone,
        String? userRealName,
        String? userRegTime,
        String? userSex,
        String? userUid,
        String? userWork,
        int? userDynamicNum
      }) {
    this._userAutograph = userAutograph;
    this._userBankCard = userBankCard;
    this._userBirthday = userBirthday;
    this._userConstellation = userConstellation;
    this._userEmail = userEmail;
    this._userIdCard = userIdCard;
    this._userRealName = userRealName;
    this._userCreateTime = userRegTime;
    this._userSex = userSex;
    this._userWork = userWork;
    this._userDynamicNum = userDynamicNum;
  }

  String? get userAutograph => _userAutograph;
  set setUserAutograph(String userAutograph) => _userAutograph = userAutograph;
  String? get userBankCard => _userBankCard;
  set setUserBankCard(String userBankCard) => _userBankCard = userBankCard;
  String? get userBirthday => _userBirthday;
  set setUserBirthday(String userBirthday) => _userBirthday = userBirthday;
  String? get userConstellation => _userConstellation;
  set setUserConstellation(String userConstellation) => _userConstellation = userConstellation;
  String? get userEmail => _userEmail;
  set setUserEmail(String userEmail) => _userEmail = userEmail;
  String? get userIdCard => _userIdCard;
  set setUserIdCard(String userIdCard) => _userIdCard = userIdCard;
  String? get userRealName => _userRealName;
  set setUserRealName(String userRealName) => _userRealName = userRealName;
  String? get userCreateTime => _userCreateTime;
  set setUserCreateTime(String userCreateTime) => _userCreateTime = userCreateTime;
  String? get userSex => _userSex;
  set setUserSex(String userSex) => _userSex = userSex;
  String? get userWork => _userWork;
  set setUserWork(String userWork) => _userWork = userWork;
  int? get userDynamicNum => _userDynamicNum;
  set setUserDynamicNum(int userDynamicNum) => _userDynamicNum = userDynamicNum;

  UserInfo.fromJson(Map<String, dynamic> json) {
    _userAutograph = json['user_Autograph'];
    _userBankCard = json['user_BankCard'];
    _userBirthday = json['user_Birthday'];
    _userConstellation = json['user_Constellation'];
    _userEmail = json['user_Email'];
    _userIdCard = json['user_IdCard'];
    _userRealName = json['user_RealName'];
    _userCreateTime = json['user_CreateTime'];
    _userSex = json['user_Sex'];
    _userWork = json['user_Work'];
    _userDynamicNum = json['user_DynamicNum'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['user_Autograph'] = this._userAutograph;
    data['user_BankCard'] = this._userBankCard;
    data['user_Birthday'] = this._userBirthday;
    data['user_Constellation'] = this._userConstellation;
    data['user_Email'] = this._userEmail;
    data['user_IdCard'] = this._userIdCard;
    data['user_RealName'] = this._userRealName;
    data['user_CreateTime'] = this._userCreateTime;
    data['user_Sex'] = this._userSex;
    data['user_Work'] = this._userWork;
    data['user_DynamicNum'] = this._userDynamicNum;

    return data;
  }
}